package com.hh.admin.enums;

/**
 * 
* @ClassName: SysUserStatus  
* @Description: TODO(用户状态 枚举类)  
* @author hxn
* @date 2018年1月18日 下午3:42:48  
*
 */
public enum SysUserStatus {

	OK(1, "启用"), FREEZED(2, "冻结"), CANCEL(3, "被删除");
	
	int code;
    String message;
    
    SysUserStatus(int code,String message){
    	this.code = code;
    	this.message = message;
    }

	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public static String valueOf(Integer value) {
        if (value == null) {
            return "";
        } else {
            for (SysUserStatus us : SysUserStatus.values()) {
                if (us.getCode() == value) {
                    return us.getMessage();
                }
            }
            return "";
        }
    }
}
